layui.use(['layer','form','table','element'],function () {
    var layer = layui.layer
        ,form = layui.form
        ,table =layui.table
        ,element = layui.element;



    $("#run").on("click",function () {
        layer.msg('爬取数据中...', { icon: 16, shade: [0.5, '#f5f5f5'], scrollbar: false, offset: '50%', time: 300000 });
        var type = $("#type").val();

        $.ajax({
            type:"POST"
            ,url:"/admin/spider/imgRun?type="+type
            ,success:function (res) {
                layer.msg(res.message);
            }
            ,error:function () {
                layer.msg("服务器错误！");
                layer.closeAll();
            }
        });
    })



});
